﻿using System;
using System.ComponentModel;

namespace Fcdbas.Platform.Enums
{
    [TypeConverter(typeof(EnumConverter))]
    public enum UpdatesSql : int
    {
        [Description("标准PL/SQL")]
        Standard = 0,
        [Description("窗体只读")]
        ReadOnly = 1
    }

    [TypeConverter(typeof(EnumConverter))]
    public enum DataItemFlags : int
    {
        ParentKey = 0,

        Key = 1,

        Attribute = 2
    }

    [TypeConverter(typeof(EnumConverter))]
    public enum DataItemUpdate : int
    {
        Allow = 0,

        AllowedIfNull = 1,

        NotAllowed = 2
    }

    #region 弹出对话框枚举

    public enum PopupResizeMode
    {
        None = 0,

        Left = 1,
        Top = 2,
        Right = 4,
        Bottom = 8,

        All = (Top | Left | Bottom | Right),
        TopLeft = (Top | Left),
        TopRight = (Top | Right),
        BottomLeft = (Bottom | Left),
        BottomRight = (Bottom | Right),
    }

    public enum GripAlignMode
    {
        TopLeft,
        TopRight,
        BottomLeft,
        BottomRight,
    }

    public enum SizeMode
    {
        UseComboSize,
        UseControlSize,
        UseDropDownSize,
    }

    #endregion

    #region 窗体类型的枚举

    public enum NodeType : int
    {
        Folder = 0,

        TableWindow = 1,

        FormWindow = 2,

        MasterDetailTabFormWindow = 4,

        DialogBox = 8
    }

    #endregion

    public enum StateType : int
    {
        OnSaved = 0,

        OverReferenceControl = 1,

        OverDataSourceBinding = 2,
    }
}
